package com.tusuo.stds;

import android.app.Application;

import com.jude.utils.JUtils;
//import com.squareup.leakcanary.LeakCanary;
import com.mob.MobApplication;
import com.tusuo.stds.di.Injector;
import com.tusuo.stds.di.module.AppModule;

import javax.inject.Singleton;

import autodagger.AutoComponent;
import cn.sharesdk.framework.ShareSDK;
import timber.log.Timber;

/**
 * @author J.Huang
 * @version 1.0
 */

@AutoComponent(modules = AppModule.class)
@Singleton
public class MyApp extends MobApplication {

    @Override
    public void onCreate() {
        super.onCreate();

//        if (BuildConfig.DEBUG) {
//            Timber.plant(new Timber.DebugTree());
//        }

//        LeakCanary.install(this);

        // 初始化DI依赖注入框架Dagger2
        // 务必先初始化AppComponent
        Injector.initMyAppComponent(this);

        JUtils.initialize(this);


    }
}
